package com.aaa.a1104.demo02;

import java.util.function.Supplier;

/**
 * @author 荆豪峰
 * @version 1.0
 */
public class Test05 {
    public static void main(String[] args) {

        Supplier<Doctor> supplier=Doctor::new;
        System.out.println(supplier.get());

    }
}
class Doctor{
    private String name;

    public Doctor() {
    }

    public Doctor(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Doctor{" +
                "name='" + name + '\'' +
                '}';
    }
}
